<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Payment
 * @copyright  Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */

class Zend_Payment_Data_Transaction
{
    protected $_transactionId;
    protected $_amount;
    protected $_currency;
    protected $_isFinal = true;

    /**
     * Class constructor
     *
     * @param string $transactionId
     */
    public function __construct($transactionId)
    {
        $this->_transactionId = $transactionId;
    }

    /**
     * Transaction id getter
     *
     * @return string
     */
    public function getId()
    {
        return $this->_transactionId;
    }

    /**
     * isFinal flag setter
     *
     * @param boolean $flag
     * @return Zend_Payment_Data_Transaction
     */
    public function setIsFinal($flag)
    {
        $this->_isFinal = $flag;
        return $this;
    }


    /**
     * Check transaction final flag
     *
     * @return boolean
     */
    public function isFinal()
    {
        return $this->_isFinal;
    }

    /**
     * Amount setter
     *
     * @param float $amount
     * @return Zend_Payment_Data_Transaction
     */
    public function setAmount($amount)
    {
        $this->_amount = $amount;
        return $this;
    }

    /**
     * Amount getter
     *
     * @return float|null
     */
    public function getAmount()
    {
        return $this->_amount;
    }

    /**
     * Currency setter
     *
     * @param string $currency
     * @return Zend_Payment_Data_Transaction
     */
    public function setCurrency($currency)
    {
        $this->_currency = $currency;
        return $this;
    }

    /**
     * Currency getter
     *
     * @return string
     */
    public function getCurrency()
    {
        return $this->_currency;
    }
}